Supplier User Invitation
This import will invite supplier users to ViSN. The system will validate each row and send invitation emails to valid users.
Fields
| Field Name | Description | Datatype | Validation | Max length | Mandatory | Example |
|---|---|---|---|---|---|---|
| DI Group ID | Supplier group identifier | string | Valid Firestore ID | - | Yes | axzKXxJuYDD0YjMXdRk5 |
| DI Supplier ID | Default service unit | string | Valid Firestore ID | - | No* | 5O4DQ6mL9bKlwdlcU3dF |
| Is Head Office User | Indicates if user is head office | string | Y/N only | 1 | Yes | N |
| First Name | User's first name | string | A-Z 0-9 and Special Characters | 50 | Yes | Johnny |
| Last Name | User's last name | string | A-Z 0-9 and Special Characters | 50 | Yes | Bairstow |
| Email Id | User's email address | string | Valid email format | 100 | Yes | johnny.bairstow@mail.com |
| Role | User's role name to be assigned | string | A-Z 0-9 and Special Characters | - | Yes | test |
| Additional DI Supplier IDs | Additional service units | string | Valid Firestore IDs, semicolon separated | - | No | dsdKDZlx5tt7sZGiBBQ8;axzKXxJuYMd0YjMXdRk5 |
*Required for non-head office users
Importing a file
Preparation
-
Create a new branch with Jira task number in the branch name
-
Delete all the files in importFiles folder
-
Create a folder with the current sprint number
-
Copy the file that needs to be imported
-
Go to
package.json, find the linevalidate:supplierUserInvites -
Modify
--filewith the relative path of the file -
Save package.json
Validating locally
-
In a terminal run
npm run validate:supplierUserInvites -
If there are no errors, push the code
Validating in workflow
-
Go to Action of Import-manager
-
Find
<Environment> - on-demand-import -
Select the branch that was created for this import
-
Enter script name as
validate:supplierUserInvites -
Leave Overrides empty
Importing the file
-
If the validation has passed
-
Go to Action of Import-manager
-
Find
<Environment> - on-demand-import -
Select the branch that was created for this import
-
Enter script name as
import:supplierUserInvites -
Enter
--persistin Overrides field
Validation Rules
Basic Information Validation
- DI Group ID must be present and valid
- Role must be present and exist in group settings
Head Office User Validation
- Service Unit ID must not be provided for head office users
- Additional Service Unit IDs are not allowed for head office users
Non-Head Office User Validation
- Service Unit ID is mandatory
- Service Unit must exist and be in 'live' status
- Additional Service Unit IDs must exist and be in 'live' status
Existing Records Check
- Email must not be already registered in the system
- Email must not have an existing pending invitation
Testing
- Invitation emails will be sent to valid users.
Status: Accepted
Category: Protected
Authored By: Sohan on Jun 3, 2025